
package de.godlike.android.web;

import java.util.HashMap;

/**
 * Klasse um eine Menge von Services zu verwalten.
 * 
 * @author markus
 */
public class JWebminServiceManager {

    private HashMap<Integer, JWebminService> services;

    public JWebminServiceManager() {
        services = new HashMap<Integer, JWebminService>();
    }

    public void addService(JWebminService service) {
        services.put(service.getServerId(), service);
    }

    public JWebminService getServiceById(int id) {
        return services.get(id);
    }

    public void createService(int serverId, String serverUrl) {
        services.put(serverId, new JWebminService(serverId, serverUrl));
    }
}
